<extend name="Public:template" />
<block name="top_header">
</block>
<block name="page_body">
	<div class="row top-hot" >
		<div class="span4">
			<include file="Public:left_menu_cate"/>
		</div>
		<div class="span12">		
			<div class="row">
				<div class="span12" id="centerShow">
					<div id="indexSlider" class="carousel slide">
						<ol class="carousel-indicators">
							<li data-target="#indexSlider" data-slide-to="0" class="active"></li>
							<volist name="ads.index_top_lunxun" id="val" offset="1">
								<li data-target="#indexSlider" data-slide-to="{$i}"></li>
							</volist>
						</ol>
						<div class="carousel-inner">
							<div class="item active">
								<a href="{$ads.index_top_lunxun.0.link}" target="_blank">
								<img src="{$ads.index_top_lunxun.0.pic}" alt="{$ads.index_top_lunxun.0.title}">
								</a>
							</div>
							<volist name="ads.index_top_lunxun" id="val" offset="1">
								<div class="item">
									<a href="{$val.link}" target="_blank">
									<img src="{$val.pic}" alt="{$val.title}">
									</a>
								</div>
							</volist>
						</div>
					</div>
				</div>
				<div class="span4">
					<a href="{:U('Product/showListPage',array('spread'=>'new'))}">
						<img src="__ROOT__/statics/www/images/icons/link_xp.jpg">
					</a>
				</div>
				<div class="span4">
					<a href="{:U('Product/showListPage',array('spread'=>'rmd'))}">
						<img src="__ROOT__/statics/www/images/icons/link_cx.jpg">
					</a>
				</div>
				<div class="span4">
					<a href="{:U('Product/showListPage',array('spread'=>'hot'))}">
						<img src="__ROOT__/statics/www/images/icons/link_rx.jpg">
					</a>
				</div>
				<div class="span12 mt5" id="fruitList">
					<ul class="thumbnails">
						<volist name="tgProdList" id="val">
						<li class="span2">
							<div class="thumbnail text-center">
								<a href="{:U('Tuangou/showDetail',array('prod_id'=>$val['prod_id']))}" target="_blank">
								<img src="{$val.prod_id|m_prod_pic='tg_prod'}" alt="{$val.name}">
								</a>
							</div>
						</li>
						</volist>
					</ul>
				</div>
			</div>
		</div>
		
		<div class="span4" id="rightHelp">
			<div class="thumbnail text-center">
				<img src="__ROOT__/statics/www/images/weixin.jpg">
				<p>关注微信，每天都有好礼送！不想扫扫看？</p>
			</div>
			<div class="text-center mt10">
				<img src="__ROOT__/statics/www/images/service.jpg">
				<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2244115959&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:2244115959:51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>
			</div>
		</div>
	</div>
	<notempty name="D1Data.list">
	<div class="row cate-floor prodList mt20" id="indexHefan">
		<div class="span20">
			<div class="floor-header" style="border-bottom:2px solid #f89406">
				<h4 class="span4" style="color:#f89406"><i class="floor-icon">1F</i> 今日午餐</h4>
				<ul class="pull-right" id="hefan_alert1">
					<li><img src="__ROOT__/statics/www/images/icons/bell.png">为了保证您的用餐时间，请务必在上午10:30之前下单</li>
					<li><img src="__ROOT__/statics/www/images/icons/bell.png">如果您所在的写字楼不允许配送人员上楼，还请您自行下楼来取</li>
				</ul>
			</div>
		</div>
		<div class="span16">
			<ul class="thumbnails">
				<volist name="D1Data.list" id="val">
				<li class="span3">
					<div class="thumbnail text-center" style="height:195px;overflow:hide">
						<img src="{$val.prod_id|m_prod_pic}" alt="{$val.name}">
						<h5>{$val.name}</h5>
						<p class="price"><span class="now">¥{$val.price_real}</span><span class="old" >¥{$val.price_sale}</span></p>
						<p ><button type="button" class="btn btn-warning btn-small withTip" onclick="addToCart('{$val.prod_id}','1','1',this)"><i class="icon-white icon-shopping-cart"></i>立即购买</button></p>
					</div>
				</li>
				</volist>
			</ul>
		</div>
		<div class="span4">
			<div class="media">
				<div class="thumbnail">
					<img data-src="http://alpha.ssszm.com/images/201310/thumb_img/54184_thumb_G_1381351517309.jpg" src="http://alpha.ssszm.com/images/201310/thumb_img/54184_thumb_G_1381351517309.jpg" alt="">
					<div class="media-body">
						<form action="{:U('Cart/index')}" method="get"  id="form_D1" name="form_D1" >
							<select name="prod_info"  style="width:180px;margin-bottom:-5px;color:#0044cc;font-weight:700;font-size:14px;" onChange="quickBuyChange()">
								<volist name="D1ListAll" id="val">
									<option value="{$val.prod_id},{$val.price_real},{$val.price_sale}">{$val.name}</option>
								</volist>
							</select>
							<p class="price"><span class="now" id="quickBuyNow">¥{$D1ListAll.0.price_real}</span><span class="old" id="quickBuyOld">¥{$D1ListAll.0.price_sale}</span></p>
							<div class="input-append input-prepend">
								<span class="btn btn-success">数量</span>
								<input type="text"  name="prod_num" style="width:25px"  value="1">
								<button type="button" name="quickBuyBtn" class="btn btn-danger withTip" onclick="quickBuy(this)"><i class="icon-white icon-plane"></i>飞速购买</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>	
	</notempty>
	<div class="row cate-floor prodList mt20" id="indexHefan">
		<div class="span20">
			<div class="floor-header" style="border-bottom:2px solid #f89406">
				<h4 class="span4" style="color:#f89406"><i class="floor-icon">1F</i> 干果炒货</h4>
				<ul class="span8 pull-right" id="hefan_alert">
					<li><img src="__ROOT__/statics/www/images/icons/bell.png">满59元立免配送费，货到付款</li>
					<li><img src="__ROOT__/statics/www/images/icons/bell.png">开业酬宾，击穿价格底线，当日订单前59名好礼相送</li>
				</ul>
			</div>
		</div>
		<div class="span20">
			<ul class="thumbnails">
				<volist name="A107Data.list" id="val">
				<li class="span4">
					<div class="thumbnail text-left">
						<img src="{$val.prod_id|m_prod_pic}" alt="{$val.name}">
						<h5>{$val.name} {$val.spec}</h5>
						<p class="price"><span class="now">¥{$val.price_real}</span></p>
						<p class="text-center"><button type="button" class="btn btn-default btn-small withTip" onclick="addToCart('{$val.prod_id}','1','1',this)"><i class=" icon-shopping-cart"></i>放入购物车</button></p>
					</div>
				</li>
				</volist>
			</ul>
		</div>
	</div>	
	
	<div class="row mt10">
		<div class="span20 text-center"><a href="http://www.59likesong.com/product/showListPage/spread/frn.html"><img src="__ROOT__/statics/www/images/guanggao_1.jpg"></a></div>
	</div>
	<div class="row cate-floor prodList mt20" id="indexJsyl">
		<div class="span20">
			<div class="floor-header" style="border-bottom:2px solid #87CEFA">
				<h4 class="span4" style="color:#87CEFA"><i class="floor-icon">2F</i> 酒水饮料</h4>
				<ul class="pull-right pagerTab">
					<volist name=":m_get_pcate('PB')" id="val">
						<li><a href="/Product/index/pcate/{$key}.html">{$val.name}</a></li>
					</volist>
				</ul>
			</div>
		</div>
		<div class="span15">
			<ul class="thumbnails">
				<volist name="B1Data.list" id="val">
				<li class="span3">
					<div class="thumbnail text-left">
						<p class="text-center"><button type="button" class="btn btn-default btn-small withTip" onclick="addToCart('{$val.prod_id}','1','1',this)"><i class=" icon-shopping-cart"></i>放入购物车</button></p>
						<img src="{$val.prod_id|m_prod_pic}" alt="{$val.name}">
						<h5>{$val.name} {$val.spec}</h5>
						<p class="price"><span class="now">¥{$val.price_real}</span></p>
						
					</div>
				</li>
				</volist>
			</ul>
		</div>
		<div class="span5" >
			<img src="{$ads.index240210_1.0.pic}" width="240" height="210">
		</div>
	</div>
	<!-- div class="row ">
		<div class="span8"><a href="{$ads.index590180_1.0.link}"><img src="{$ads.index390160_1.0.pic}" width="390" height="160"></a></div>
		<div class="span12"><a href="{$ads.index590180_1.0.link}"><img src="{$ads.index590180_1.0.pic}"></a></div>
	</div> -->
	<div class="row cate-floor mt10 prodList" id="indexSply">
		<div class="span20">
			<div class="floor-header" style="border-bottom:2px solid #43CD80">
				<h4 class="span4" style="color:#43CD80"><i class="floor-icon">3F</i> 食品粮油</h4>
				<ul class="pull-right pagerTab">
					<volist name=":m_get_pcate('PA')" id="val">
						<li><a href="/Product/index/pcate/{$key}.html">{$val.name}</a></li>
					</volist>				
				</ul>
			</div>
		</div>
		<div class="span5 mt20" >
			<img src="{$ads.index240210_2.0.pic}" width="240" height="210">
		</div>
		<ul class="thumbnails">
			<volist name="A1Data.list" id="val">
			<li class="span5" >
				<div class="thumbnail text-center">
						<img class="thumbnail pull-left" src="{$val.prod_id|m_prod_pic}" style="border:0" alt="{$val.name}">
					<div class="media-body">
					<h5 class="media-heading">{$val.name} {$val.spec}</h5>
					<p class="price"><span class="now">¥{$val.price_real}</span></p>
					<p ><button type="button" class="btn btn-warning btn-small withTip" onclick="addToCart('{$val.prod_id}','1','1',this)"><i class="icon-white icon-shopping-cart"></i>放入购物车</button></p>
					</div>
				</div>
			</li>
			</volist>
			<volist name="A203Data.list" id="val">
			<li class="span5" >
				<div class="thumbnail text-center">
						<img class="thumbnail pull-left" src="{$val.prod_id|m_prod_pic}" style="border:0" alt="{$val.name}">
					<div class="media-body">
					<h5 class="media-heading">{$val.name} {$val.spec}</h5>
					<p class="price"><span class="now">¥{$val.price_real}</span></p>
					<p ><button type="button" class="btn btn-warning btn-small withTip" onclick="addToCart('{$val.prod_id}','1','1',this)"><i class="icon-white icon-shopping-cart"></i>放入购物车</button></p>
					</div>
				</div>
			</li>
			</volist>
		</ul>
	</div>
	<div class="row">
		<div class="span15 text-left" ><img src="{$ads.index500120_1.0.pic}" alt="七度空间"></div>
		<div class="span5">
			<img src="__ROOT__/statics/www/images/brand/jiaduobao.jpg" alt="加多宝">
			<img src="__ROOT__/statics/www/images/brand/huiyuan.jpg" alt="汇源">
			<img src="__ROOT__/statics/www/images/brand/lanyueliang.jpg" alt="蓝月亮">
			<img src="__ROOT__/statics/www/images/brand/miaojie.jpg" alt="妙洁">
		</div>
		
	</div>
	<div class="row cate-floor mt10 prodList" id="indexRybh">
		<div class="span20">
			<div class="floor-header" style="border-bottom:2px solid #DA70D6">
				<h4 class="span4" style="color:#DA70D6"><i class="floor-icon">4F</i> 日用百货</h4>
				<ul class="pull-right pagerTab">
					<volist name=":m_get_pcate('PC')" id="val">
						<li><a href="/Product/index/pcate/{$key}.html">{$val.name}</a></li>
					</volist>				
				</ul>
			</div>
		</div>
		<div class="span15">
			<ul class="thumbnails">
				<volist name="C1Data.list" id="val" offset="0" length='5'>
				<li class="span3">
					<div class="thumbnail text-center">
						<img src="{$val.prod_id|m_prod_pic}" alt="{$val.name}">
						<h5>{$val.name} {$val.spec}</h5>
						<p class="price"><span class="now">¥{$val.price_real}</span><span class="old">¥{$val.price_sale}</span></p>
						<p ><button type="button" class="btn btn-default btn-small withTip" onclick="addToCart('{$val.prod_id}','1','1',this)"><i class=" icon-shopping-cart"></i>放入购物车</button></p>
					</div>
				</li>
				</volist>
			</ul>
		</div>
		<div class="span5" >
			<img src="{$ads.index240210_3.0.pic}" width="240" height="210">
		</div>
		<ul class="thumbnails" id="rybhLX">
			<volist name="C1Data.list" id="val" offset="5" >
			<li class="span5" >
				<div class="thumbnail text-center">
					<img class="thumbnail pull-left" src="{$val.prod_id|m_prod_pic}" style="border:0" alt="{$val.name}">
					<div class="media-body">
					<p ><button type="button" class="btn btn-warning btn-small withTip" onclick="addToCart('{$val.prod_id}','1','1',this)"><i class="icon-white icon-shopping-cart"></i>放入购物车</button></p>
					<h5 class="media-heading">{$val.name} {$val.spec}</h5>
					<p class="price"><span class="now">¥{$val.price_real}</span></p>
					
					</div>
				</div>
			</li>
			</volist>
		</ul>
	</div>
</block>
<block name="script_footer">
<script type="text/javascript">
//飞速购买通道
function quickBuy(obj){
	var formObj = document.forms['form_D1'];
	var elsObj = formObj.elements;
	var prodInfos = elsObj['prod_info'].value.split(",");
	var prodNum = elsObj['prod_num'].value;
	addToCart(prodInfos[0],prodNum,2,obj);
}

function quickBuyChange(){
	var formObj = document.forms['form_D1'];
	var elsObj = formObj.elements;
	var prodInfos = elsObj['prod_info'].value.split(",");
	$("#quickBuyNow").html("¥"+prodInfos[1]);
	$("#quickBuyOld").html("¥"+prodInfos[2]);
}

$(document).ready(function(){
	$(".serviceImg").on('click',function(){
		$("#serviceContent").html($(this).attr('alt')).show();
	});
	$("#serviceContent").on('click',function(){
		$(this).hide();
	});

	$('#indexJsyl .thumbnails').carouFredSel({
		items:{
			visible:5
		},
		scroll: {
			items:2,
			duration: 1000,
			timeoutDuration: 8000
		},
		auto: {
			pauseOnHover: 'resume'
		}
	});
	$('#rybhLX').carouFredSel({
		items:{
			visible:4
		},
		scroll: {
			items:2,
			duration: 1000,
			timeoutDuration: 6000
		},
		auto: {
			pauseOnHover: 'resume'
		}
	});
	$('#hefan_alert').carouFredSel({
		items:{
			visible:1
		},
		scroll: {
			duration: 1000,
			timeoutDuration: 3000
		},
		direction:'up'
	});
	$('#fruitList .thumbnails').carouFredSel({
		items:{
			visible:6
		},
		scroll: {
			items:2,
			duration: 1000,
			timeoutDuration: 6000
		},
		auto: {
			pauseOnHover: 'resume'
		}
	});
})
</script>
</block>